package cn.wolfcode.rbac.query;
/*
分页查询
 */

import org.springframework.util.StringUtils;

public class QueryObject {
    public void setCurrentPage(int currentPage) {
        this.currentPage = currentPage;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public void setKeyword(String keyword) {
        this.keyword = keyword;
    }

    public int getCurrentPage() {
        return this.currentPage;
    }

    private int currentPage = 1;

    public int getPageSize() {
        return this.pageSize;
    }

    private int pageSize = 5;
    //模糊查询关键字
    private String keyword;

    //部门下拉框查询，

    public int getStart() {
        return (this.currentPage - 1) * this.pageSize;
    }

    public String getKeyword() {
        return StringUtils.hasLength(this.keyword) ? this.keyword : null;
    }
}
